<?php
	require 'ShopDAO.inc';
	$shop_id = $_REQUEST['shop_id'];
	$name = $_REQUEST['name'];
	$title = $_REQUEST['title'];
	$address = $_REQUEST['address'];
	$area = $_REQUEST['area'];
	$telephone = $_REQUEST['telephone'];
	$email = $_REQUEST['email'];
	$latitude = $_REQUEST['latitude'];
	$longitude = $_REQUEST['longitude'];
	$createtime = $_REQUEST['createtime'];
	$description = $_REQUEST['description'];
	$details = $_REQUEST['details'];
	$image = $_REQUEST['image'];
	$favorite_count = $_REQUEST['favorite_count'];
	$tap_count = $_REQUEST['tap_count'];
	$lastedittime = $_REQUEST['lastedittime'];
?>	
	<form id="form1" method="post" action="editImageForShop.php">
	
		<input type='hidden' name='image' value='<?php echo $image ?>'/>	
		<input type='hidden' name='shop_id' value='<?php echo $shop_id ?>'/>
			<fieldset>
				<ul>
					<li><label for="lshopname">商家名称:</label> <input id="shopname"
						type="text" name="shopname" value = <?php echo $name?> />*</li>
					<li><label for="lshoptitle">商家标题:</label> <input id="shoptitle"
						type="text" name="shoptitle" value='<?php echo $title?>' />*</li>
					<li><label for="lshopaddress">商家地址:</label> <input id="shopaddress"
						type="text" name="shopaddress" value='<?php echo $address?>' />*</li>
					<li><label for="lshopaddress">店铺区域:</label>
						<select name="area">
						<?php 
							$query = "SELECT * FROM area";
							$result = mysql_query($query);
							$num = mysql_num_rows($result);
							for ($j = 0; $j<$num;$j++)
							{
								$row = mysql_fetch_array($result);	
								$area_id = $row['area_id'];
								$area_name = $row['area_name'];
								if ($area_name == $area) {	
									echo "<option value=".$area_id." selected='selected'>".$area_name."</option>";
								}	
								else 
								{
									echo "<option value=".$area_id.">".$area_name."</option>";
								}			
							}
						?>
						</select>
					*</li>
					<li><label for="lshopphone">商家电话:</label> <input id="shopphone"
						type="text" name="shopphone" value='<?php echo $telephone?>' />*</li>
					<li><label for="lshopemail">商家邮件:</label> <input id="shopemail"
						type="text" name="shopemail" value='<?php echo $email?>' />*</li>
					<li><label for="lshopposition">商家坐标:</label> 纬度:<input size="8"
						id="shoplatitude" type="text" name="shoplatitude" value='<?php echo $longitude?>' />* 
						经度:<input size="8" id="shoplongitude" type="text" name="shoplongitude" value='<?php echo $latitude?>' />*</li>
					
					<li><label for="lshopdescription">商家描述:</label> <input id="shopdescription"
						type="text" name="shopdescription" value='<?php echo $description?>' />*</li>
					<li><label for="lshopdetails">商家描述:</label> <textarea
							id="shopdetails" name="shopdetails" rows="10" cols="50" ><?php echo $details?></textarea>
					</li>
					<li><input id="inputreset" type="reset" name="inputreset"
						value="重填" /> <input id="inputsubmit" type="submit"
						name="inputsubmit" value="下一步" /></li>
				</ul>

			</fieldset>

		</form>